package vinylInt 
{
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.system.Security;
	import flash.events.EventDispatcher;
	
	import SWFAddress;
	import SWFAddressEvent;
	
	/**
	 * ...
	 * @author 
	 */
	public class VinylIntSwfAddress extends EventDispatcher
	{
		public static var target = null;
		public static var handle = null;
		
		//가상 URL 비교
		public static var  tmp = new Array();
		
		private static var instance:VinylIntSwfAddress;
		
		public function VinylIntSwfAddress()
		{
			if(instance != null)
			{
				throw new Error("VinylIntSwfAddress Singleton already constructed!");
			}
		}
		
		public static function getInstance():VinylIntSwfAddress
		{
			if(instance == null)
			{
				instance = new VinylIntSwfAddress();
			}
			
			return instance;
		}
		
		public function init()
		{
		}
		
		// SWFAddress actions
		public function btnClick( e:MouseEvent, f:Function = null ) {
			target = e;
			handle = f;
			SWFAddress.setValue( e.relatedObject ?  target.deepLink : e.currentTarget.deepLink  );
		}
		
		public function btnRollOver(e:MouseEvent) {
			SWFAddress.setStatus(  e.relatedObject ?  target.deepLink : e.currentTarget.deepLink  );
		}
		
		public function btnRollOut(e:MouseEvent) {
			SWFAddress.resetStatus();
		}
		
	}

}

















